using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class SaveSoltUI : MonoBehaviour, ISaveManager
{
    public int saveSoltID;
    [SerializeField] private bool hasSaveData;
    private TextMeshProUGUI saveSoltText;
    private TextMeshProUGUI defaultText;

    private void Start()
    {
        saveSoltText = GetComponentInChildren<TextMeshProUGUI>();
        defaultText.text = saveSoltText.text;

        if(hasSaveData)
            saveSoltText.text = "Save Data " + saveSoltID.ToString();
    }

    public void CreateSaveData()
    {
        hasSaveData = true;
        saveSoltText.text = "Save Data " + saveSoltID.ToString();
        SaveManager.instance.fileName = "GameData" + saveSoltID.ToString();
    }

    public void LoadData(GameData _data)
    {
        
    }

    public void SaveData(ref GameData _data)
    {
        _data.saveId = saveSoltID;
    }
}
